--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
docs/agents/conventions/backend.md 82e41b2d087d0b724ba86a4352b20af38ec34a55 (82e41b2d) Text, 922 B
Backend conventions
Applies when editing T383838meshchatx/**/*.py.
• Prefer T383838uv run / T383838task for pytest and ruff.
• HTTP handlers: return 400 for T383838ValueError / bad input, 503 for retryable SQLite/Landlock unavailability, 500 only for unexpected failures.
• Multipart parsers must not assume field order.
• SQLite worker connections must set T383838temp_store=MEMORY in T383838DatabaseProvider (Landlock-safe).
• Under Landlock, memory-pressure must not force FILE temp for conversation queries.
• Keep conversation list queries slim: truncate content, derive attachment flags in SQL, avoid shipping full T383838fields blobs.
• Identity restore validates size and empty payloads. Preserve existing identity metadata on re-import.
• No backticks in code comments. Prefer plain words or quoted identifiers.
• RRC / LXMF / LXST changes: open the matching skill under T383838docs/agents/skills/ and run oracle-style tests when behaviour changes.
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────